/**
 * Created by hcadmin on 16/3/10.
 */
define([
    "jquery",
    "IO",
    "bootbox"
], function($,IO,bootbox) {
    $(function () {
        var grid;
        var check_id;

        //每列数据列性
        var columns = [

            {
                title: '专业',
                dataIndex: 'course_name',
                dataSource: function (data, datarow, gridobj, current_column) {
                    return "<span>" + data[datarow].major_name + "</span>";
                }
            },
            {
                title: '工本费',
                dataIndex: 'course_name',
                dataSource: function (data, datarow, gridobj, current_column) {
                    return "<span>" + data[datarow].price + "</span>";
                }
            },
            {
                title: '标题',
                dataIndex: 'course_name',
                dataSource: function (data, datarow, gridobj, current_column) {
                    return "<span>" + data[datarow].title + "</span>";
                }
            },
            {
                title: '内容',
                dataIndex: 'course_name',
                dataSource: function (data, datarow, gridobj, current_column) {
                    return "<span>" + data[datarow].content.substring(0,100) + "...</span>";
                }
            },



            {
                title: '操作',
                dataIndex: 'action',
                dataSource: function (data, datarow, gridobj, current_column) {

                    //通过
                    return "<span><a href='/pte/detailrenzhenginfo?id="+data[datarow].id+"' style='color: orange;'>查看详情</a></span>";



                }
            },

        ];


        //数组初始化

        function dataInit() {
            grid = new Grid("/pte/api/renzhenginfo", $("#table_my_toast"), $("#paging_my_toast"), 1, 10, columns, "", 10);

            //初始化
            grid.Init();
        }




        dataInit();
        //查询


    });
});
